package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

// 一个服务员可以匹配多个路径，但是同一个路径不能由两个服务器来服务
@WebServlet(value = {"/c","/c1","/c2","/c3"})
public class CServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		System.out.println("----------------------");
		System.out.println("客户端IP:" + req.getRemoteHost());
		System.out.println("客户端Port:" + req.getRemotePort());
		System.out.println("请求方式:" + req.getMethod());
		System.out.println("----------------------");
	}
}
